var elementManager = (function () {
	
	var elements = {};
	
	var _em = this;
	
	this.init = function () {
		$(CSS_WRAPPER).each(function () {
			_em.registerOrRefresh($(this));
		});
	}
	
	this.registerOrRefresh = function ($elem) {
		var id = $elem.attr('id');
		var offset = $elem.offset();
		elements[id] = {
			x1: offset.left,
			y1: offset.top,
			x2: offset.left + $elem.width(),
			y2: offset.top + $elem.height(),
		};
	};
	
	this.getElements = function () {
		return elements;
	};
	
	return {
		init: init,
		registerOrRefresh: registerOrRefresh,
		getElements: getElements
	};
	
})();